package cn.com.hongfu.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.com.hongfu.dao.CaseMapper;
import cn.com.hongfu.model.Case;
import cn.com.hongfu.model.CaseImg;
@Service("caseService")
public class CaseServiceImpl implements CaseService{
	@Autowired
	public CaseMapper caseMapper ;
	@Override
	public int save(Case c) {
		return caseMapper.save(c);
	}
	@Override
	public List<Case> getAll() {
		return caseMapper.getAll();
	}
	@Override
	public int saveImg(CaseImg caseImg) {
		caseMapper.saveImg(caseImg);
		return 0;
	}
	@Override
	public List<CaseImg> getImgByCaseId(int caseId) {
		// TODO Auto-generated method stub
		return caseMapper.getImgByCaseId(caseId);
	}
	@Override
	public Case getCaseById(int id) {
		// TODO Auto-generated method stub
		return caseMapper.getCaseById(id);
	}
	@Override
	public List<Case> getCaseForIndex() {
		return caseMapper.getCaseForIndex();
	}
}
